<template>
  <div @click="fatherFn">
    <button @click.stop>儿子阻止冒泡</button>
    <!-- 事件修饰符 -->
    <!-- 
      .stop
      .prevent
     -->
     <a @click.prevent href="https://www.baidu.com">点我去百度</a>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    fatherFn(){
      console.log("你是猪");
    },
    goToBaidu(e) {
      e.preventDefault()
    },
    goToBaiduArg(num,e) {
      // e.preventDefault()
    },
  },
};
</script>

<style lang="scss" scoped>
</style>